import { create } from "zustand";

export interface HistoryModalInterface {
    isOpen: boolean;
    setIsOpen: (isOpen: boolean) => void;
    toggle: () => void;
}

export const useHistoryModal = create<HistoryModalInterface>((set) => {
    return {
        isOpen: false,
        setIsOpen: (isOpen: boolean) => set({ isOpen }),
        toggle: () => set((state) => ({ isOpen: !state.isOpen })),
    };
});
